<?xml version="1.0" encoding="ISO-8859-1"?>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:xf="http://www.w3.org/2002/xforms"
      xmlns:ev="http://www.w3.org/2001/xml-events"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      lang="de">
    <head>
        <title>Output</title>

        <style type="text/css">
            .xfGroupLabel {
                font-size: 12pt;
                font-weight: bold;
                padding-bottom: 10px;
            }

            #mips .xfTrigger .dijitButtonContents {
                width: 200px;
            }
        </style>

    </head>
    <body class="tundra" style="margin:30px;">

        <div id="xforms">
            <div style="display:none;">
                <xf:model id="model-1">
                    <xf:instance id="instance-1" xmlns="">
                        <data constraint="true" readonly="false" required="false" relevant="true">
                            <items>
                                <item>a output value</item>
                                <item>http://chiba.sourceforge.net</item>
                                <item><![CDATA[<b>Providing</b> <i>basic</i> HTML <u>formatting</u>]]></item>
                                <item>/chiba/resources/images/chiba50t.gif</item>
                            </items>
                        </data>
                    </xf:instance>

                    <xf:bind nodeset="items">
                        <xf:bind nodeset="item[1]"
                                 constraint="boolean-from-string(../../@constraint)"
                                 readonly="boolean-from-string(../../@readonly)"
                                 required="boolean-from-string(../../@required)"
                                 relevant="boolean-from-string(../../@relevant)"/>

                        <xf:bind nodeset="item[2]"
                                 constraint="boolean-from-string(../../@constraint)"
                                 readonly="boolean-from-string(../../@readonly)"
                                 required="boolean-from-string(../../@required)"
                                 relevant="boolean-from-string(../../@relevant)"
                                 type="anyURI"/>

                        <xf:bind nodeset="item[3]"
                                 constraint="boolean-from-string(../../@constraint)"
                                 readonly="boolean-from-string(../../@readonly)"
                                 required="boolean-from-string(../../@required)"
                                 relevant="boolean-from-string(../../@relevant)"/>

                        <xf:bind nodeset="item[4]"
                                 constraint="boolean-from-string(../../@constraint)"
                                 readonly="boolean-from-string(../../@readonly)"
                                 required="boolean-from-string(../../@required)"
                                 relevant="boolean-from-string(../../@relevant)"/>
                        </xf:bind>


                </xf:model>
            </div>

            <xf:group appearance="full" ref="items">
                <xf:label>XForms Output Control</xf:label>
                <xf:output ref="item[1]">
                    <xf:label>a standard output</xf:label>
                    <xf:hint>This is a standard output control</xf:hint>
                    <xf:help>Not much to say here but some basic html formatting is <b>possible</b></xf:help>
                    <xf:alert>A value for standard output is required</xf:alert>
                </xf:output>
                <br/>
                <xf:output ref="item[2]">
                    <xf:label>anyURI output</xf:label>
                    <xf:hint>This is a output control bound to an anyURI node</xf:hint>
                    <xf:help>Not much to say here but some basic html formatting is <b>possible</b></xf:help>
                    <xf:alert>A value for standard output is required</xf:alert>
                </xf:output>
                <br/>

                <xf:output ref="item[3]" mediatype="text/html">
                    <xf:label>mediatype text/html</xf:label>
                    <xf:hint>This is a output control bound to an anyURI node</xf:hint>
                    <xf:help>Not much to say here but some basic html formatting is <b>possible</b></xf:help>
                    <xf:alert>A value for standard output is required</xf:alert>
                </xf:output>
                <br/>

                <xf:output ref="item[4]" mediatype="image/gif">
                    <xf:label>mediatype image/gif</xf:label>
                    <xf:hint>This is an output control with mediatype image/gif</xf:hint>
                    <xf:help>Not much to say here but some basic html formatting is <b>possible</b></xf:help>
                    <xf:alert>A value for standard output is required</xf:alert>
                </xf:output>
            </xf:group>
        </div>

        <xf:group id="mips" ref="/data">
            <xf:label>Model Item Property Tests</xf:label>
            <!-- valid -->
            <xf:trigger ref="@constraint[boolean-from-string(.)]">
                <xf:label>set all controls to invalid</xf:label>
                <xf:action>
                    <xf:setvalue ref="." value="'false'"/>
                </xf:action>
            </xf:trigger>
            <xf:trigger ref="@constraint[not(boolean-from-string(.))]">
                <xf:label>set all controls to valid</xf:label>
                <xf:action>
                    <xf:setvalue ref="." value="'true'"/>
                </xf:action>
            </xf:trigger>

            <!-- readonly -->
            <xf:trigger ref="@readonly[not(boolean-from-string(.))]">
                <xf:label>set all controls to readonly</xf:label>
                <xf:action>
                    <xf:setvalue ref="." value="'true'"/>
                </xf:action>
            </xf:trigger>
            <xf:trigger ref="@readonly[boolean-from-string(.)]">
                <xf:label>set all controls to readwrite</xf:label>
                <xf:action>
                    <xf:setvalue ref="." value="'false'"/>
                </xf:action>
            </xf:trigger>

            <!-- required -->
            <xf:trigger ref="@required[not(boolean-from-string(.))]">
                <xf:label>set all controls to required</xf:label>
                <xf:action>
                    <xf:setvalue ref="." value="'true'"/>
                </xf:action>
            </xf:trigger>
            <xf:trigger ref="@required[boolean-from-string(.)]">
                <xf:label>set all controls to optional</xf:label>
                <xf:action>
                    <xf:setvalue ref="." value="'false'"/>
                </xf:action>
            </xf:trigger>

            <!-- relevant -->
            <xf:trigger ref="@relevant[boolean-from-string(.)]">
                <xf:label>set all controls to non-relevant</xf:label>
                <xf:action>
                    <xf:setvalue ref="." value="'false'"/>
                </xf:action>
            </xf:trigger>
            <xf:trigger ref="@relevant[not(boolean-from-string(.))]">
                <xf:label>set all controls to relevant</xf:label>
                <xf:action>
                    <xf:setvalue ref="." value="'true'"/>
                </xf:action>
            </xf:trigger>
        </xf:group>
    </body>
</html>

